import React from 'react';
import { Tooltip } from 'antd';
import CommonList from '../../../../components/CommonLists/list';

class SortList extends CommonList {
  constructor(props) {
    super(props);
    this.api = 'sort';
    this.btnGroup = [this.delButton];

    this.columns = [
      {
        title: '项目名称',
        key: 'projectName',
        dataIndex: 'projectName',
        ellipsis: true,
        render: (text) => {
          return (
            <Tooltip title={text} placement='topLeft'>
              {text}
            </Tooltip>
          );
        },
      },
      {
        title: '分类名称',
        dataIndex: 'name',
        key: 'name',
        ellipsis: true,
        render: (text) => {
          return (
            <Tooltip title={text} placement='topLeft'>
              {text}
            </Tooltip>
          );
        },
      },
      {
        title: '分类code',
        dataIndex: 'code',
        key: 'code',
        ellipsis: true,
        render: (text) => {
          return (
            <Tooltip title={text} placement='topLeft'>
              {text}
            </Tooltip>
          );
        },
      },
      {
        title: '变量数',
        dataIndex: 'varNumber',
        key: 'varNumber',
        ellipsis: true,
        width: 150,
        render: (text) => {
          return (
            <Tooltip title={text} placement='topLeft'>
              {text}
            </Tooltip>
          );
        },
      },
    ];
  }
}

export default SortList;
